<?php
$dbhost = "infra.zeabur.com:31289";
$dbuser = "root";
$dbpass = '9ts0qzE47u35'; 

try {
    $conn = new mysqli($dbhost, $dbuser, $dbpass);

    // 检查连接是否成功
    if ($conn->connect_error) {
        throw new Exception("连接失败：发生未知错误，请检查配置信息。", $conn->connect_errno);
    }

    // 检查连接是否成功
    if (mysqli_connect_errno()) {
        throw new Exception("连接失败：发生未知错误，请检查配置信息。", mysqli_connect_errno());
    }
    $conn = new mysqli($dbhost, $dbuser, $dbpass);
    
} catch (Exception $e) {
    echo "连接失败：" . $e->getMessage();
}


